from selenium.webdriver.common.by import By
from base import Base
class Page(Base):
    #点击输入框
    def dianjishurukuang(self):
        loc=(By.XPATH,'//android.widget.ViewSwitcher[@resource-id="com.achievo.vipshop:id/index_search_custom_hint"]/android.widget.RelativeLayout')
        ele=self.find_ele(loc)
        return ele
    #输入文字
    def shuruwenzhi(self):
        loc=(By.CLASS_NAME,'android.widget.EditText')
        ele=self.find_ele(loc)
        return ele
    #点击按钮
    def dianjianniou(self):
        loc=(By.ANDROID_UIAUTOMATOR,'new UiSelector().className("android.widget.RelativeLayout").instance(11)')
        ele=self.find_ele(loc)
        return ele
    #输入文字
    def shurubeijingweishi(self):
        loc=(By.ID,'com.achievo.vipshop:id/search_text_view')
        ele=self.find_ele(loc)
        return ele
    #点击北京卫视按钮
    def dianjianniodddu(self):
        loc=(By.ANDROID_UIAUTOMATOR,'new UiSelector().resourceId("com.achievo.vipshop:id/tv_search")')
        ele=self.find_ele(loc)
        return ele
    #输入文字
    def shuruwenzhiqiangguo(self):
        loc=(By.ANDROID_UIAUTOMATOR,'new UiSelector().resourceId("com.achievo.vipshop:id/search_text_view")')
        ele=self.find_ele(loc)
        return ele
    #点击按钮
    def dianjiqiangguoanniou(self):
        loc=(By.ID,'com.achievo.vipshop:id/tv_search')
        ele=self.find_ele(loc)
        return ele
    #点击返回
    def dianjifanhui(self):
        loc=(By.ACCESSIBILITY_ID,'返回')
        ele=self.find_ele(loc)
        return ele